package org.mg.engine.impl;

import org.mg.engine.InstructAbstract;

/**
 * Create by bo.chen in 2018/10/13 0:06
 */
public class InInstruct extends InstructAbstract {

    @Override
    public void execute(String data) {
        if(!validata(data)) {
            return;
        }
        try {
            if(data.indexOf(" ") > 0) {
                error();
                return;
            }
            CACHE.put(data,this.getSession());
            multimap.put(this.getSession(),data);
            success();
            return;
        } catch (Exception e) {
            e.printStackTrace();
        }
        error();
    }
}
